/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package services;

/**
 *
 * @author minaev
 */
public class ConvIntByte {

    public static int byte2Int(byte b) {
        return b < 0 ? b + 256 : b;
    }

    public static byte int2Byte(int i) {
        return i > 127 ? (byte) (i - 256) : (byte) i;
    }
}
